//设计函数，该函数为void类型，接受double类型的参数
#include <stdio.h>

void cube(double num);

int main(void)
{
    double num;

    printf("Enter a number to calculate its cube: ");
    scanf("%lf", &num);
    cube(num);

    puts("\nBye");
    return 0;
}

void cube(double num)
{
    double ncube = num * num * num;

    printf("%.2f cubed is %.2f\n", num, ncube);
}